import sys,os
sys.path.append(os.pardir)
import numpy as np 
import matplotlib.pyplot as plt 
from common.functions import step_function,sigmoid

# 通过图形比较阶跃函数、sigmoid函数输出结果
x = np.arange(-5.0,5.0,0.1)
y1 = sigmoid(x)
y2 = step_function(x)

plt.plot(x,y1,label='sigmoid')
plt.plot(x,y2,'k--',label='step_function')
plt.ylim(-0.1,1.1)
plt.legend()
plt.show()